import pyautogui
import time

# 禁用故障安全机制（不推荐在实际应用中这样做，除非你清楚风险）
pyautogui.FAILSAFE = False
time.sleep(3)
# 获取屏幕大小
screen_width, screen_height = pyautogui.size()
# 将鼠标移动到屏幕右下角
pyautogui.moveTo(screen_width, screen_height, duration=1)
# 相对移动鼠标
pyautogui.moveRel(-200, -200, duration=0.5)
# 在屏幕右下角点击鼠标左键
pyautogui.click(screen_width, screen_height, duration=0.5)
# 右键点击
pyautogui.click(button='right')
# 连续点击
pyautogui.click(screen_width / 2, screen_height / 2, clicks=3, interval=0.1, duration=0.5)
# 带右键的连续点击
pyautogui.click(screen_width / 2, screen_height / 2, clicks=2, interval=0.5, button='right', duration=0.2)
# 鼠标滚轮滚动
pyautogui.scroll(2)
# 在屏幕中心滚动鼠标滚轮
pyautogui.scroll(-10, screen_width / 2, screen_height / 2)
# 拖动鼠标到屏幕左上角
pyautogui.dragTo(0, 0, duration=0.5)
# 相对拖动鼠标
pyautogui.dragRel(100, 100, duration=0.5, button='right')
# 等待5秒
time.sleep(5)